#pragma once

#include <linux/nodemask_types.h>

struct page;

/*
 * @context - enum meminit_context 
*/
void __free_pages_core(struct page *page, unsigned int order, int context);

/*****************************************************/
extern void __free_pages(struct page *page, unsigned int order);
extern struct page *alloc_pages_noprof(gfp_t gfp_mask, unsigned int order);
extern struct page *__alloc_frozen_pages_noprof(gfp_t gfp, unsigned int order,
                                                int preferred_nid, nodemask_t *nodemask);
extern void free_frozen_pages(struct page *page, unsigned int order);

/*
 * Drop a ref, return true if the refcount fell to zero (the page has no users)
 */
int put_page_testzero(struct page *page);

void free_pages(unsigned long addr, unsigned int order);
